#include <cstdio>
#include <iostream>
#include <boost/shared_ptr.hpp>
#include <map>
#include <typeinfo>
#include <stdint.h>

#include "Framework/Managers/StateManager.hh"
#include "Common/Reflection.hh"
#include "Common/Singleton.hh"
#include "Common/Meta/If.hh"
#include "Common/Meta/TypesEqual.hh"

struct Test
{
    typedef Test* Ptr;
    int a;
};

struct Test1
{
    int b;
};

struct Test2 : public Singleton< Test2 >
{
    int c;
};

struct Names
{
    static const char iName[];
};

const char Names::iName[] = "Test";



int main( int /*argc*/, char** /*argv*/ )
{
    using namespace Common;
    using namespace Reflection;
        
    typedef Property< TypeDcl< Test >, TypeDcl< int >, &Test::a, Names::iName > TestProperty;
    TestProperty lTestProperty;
    std::cout << typeid( lTestProperty.iPointerToMember ).name() << std::endl;
        
    PropertyContainer< std::string, std::string > a;
    std::cout << "Property container size: " << a.getSize() << std::endl;

    BaseClass::Ptr testClass = Class< TypeDcl< Test > >::createInstance();
    std::cout << ( testClass->getTypeDcl().getTypeInfo() == typeid( Test ) ) << std::endl;
    //BindedProperty< TestProperty, TypeDcl< Test > > lBinded( testClass );

    ////////////////////////////////////////////////////////
    
    std::cout << Test2::instance()->c << std::endl;

    return 0;
}
